package com.friend.config;


import org.springframework.web.servlet.HandlerInterceptor;




public class LoginInterceptor implements HandlerInterceptor {
    /*
      请求之前调用处理
     */
    /*@Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        //判断用户是否登录
        User tuser= (User) request.getSession().getAttribute("user");
        if(tuser!=null){//存在
            return true ;
        }
        //跳转到登录页面
        response.sendRedirect(request.getContextPath()+"/login");
        return false;
    }*/
}
